﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    Inherits="Nivdal.TeamEvents" Title="" StylesheetTheme="SkinFile" CodeBehind="TeamEvents.aspx.cs" %>

<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TeamEvents_PageNameLabel %>"
        CssClass="PageNameContentStyle"></asp:Label>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="basic_element">
    <div class="red_title">
       <asp:HyperLink ID="TeamHomePageButton" runat="server" CssClass="white_title"></asp:HyperLink>
       &nbsp;
       <asp:Label ID="HistoryTitleLabel" runat="server" CssClass="white_title" Text="<%$ Resources:Resource, TeamEvents_HistoryTitleLabel %>"></asp:Label>
    </div>
    <div class="padding5">

    <asp:GridView ID="LeagueHistoryGridview" runat="server" DataSourceID="LeagueStandingsDataSource" AutoGenerateColumns="false"
     AllowPaging="false" SkinID="Professional">
    
    <Columns>
        <asp:BoundField DataField="Season" HeaderText="<%$ Resources:Resource, Global_Season %>" />
        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_League %>">
            <ItemTemplate>
                <asp:HyperLink ID="LeagueHyperlink" runat="server" SkinID="BlackHyperLinkSkin" Text='<%# Eval("LeagueName") %>'
                 NavigateUrl='<%# "OldLeagueTables.aspx?LeagueId=" +  Eval("LeagueId") + "&Season=" + Eval("Season") %>' ></asp:HyperLink>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField HeaderText="<%$ Resources:Resource, Global_TeamName %>" DataField="TeamName" />
        <asp:BoundField HeaderText="<%$ Resources:Resource, Global_Position %>" DataField="Position" />
        <asp:BoundField HeaderText="<%$ Resources:Resource, Global_Points %>" DataField="Points" />
        <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Goals %>">
            <ItemTemplate>
                <asp:Label ID="GoalsLabel" runat="server" Text='<%# Eval("GoalsScored") + " - " + Eval("GoalsAgainst") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns> 
    </asp:GridView>
    <asp:SqlDataSource ID="LeagueStandingsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_TeamLeagueHistory" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    </div></div>
    
    <table cellpadding="5" cellspacing="0" style="width:100%;">
    <tr>
    <td style="width:50%; vertical-align:top;">
        <div class="basic_element">
        <div class="red_title">
        <asp:Label ID="NationalCupHistoryTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_NationalCup %>" CssClass="white_title"></asp:Label>
        </div><div class="padding5">
        <asp:GridView ID="NationalCupHistoryGrid" DataSourceID="CupHistoryDataSource" runat="server" AutoGenerateColumns="false"
         SkinId="Professional"  >
         
         <Columns>
            <asp:BoundField DataField="Season" HeaderText="<%$ Resources:Resource, Global_Season %>" />
            <asp:BoundField HeaderText="<%$ Resources:Resource, Global_TeamName %>" DataField="TeamName" />
            <asp:BoundField HeaderText="<%$ Resources:Resource, Global_Round %>" DataField="Round" />
         </Columns>
         <EmptyDataTemplate>
            <asp:Label ID="NoGamesLabel" runat="server" Text="<%$ Resources:Resource, TeamEvents_NoNationalCup %>" SkinID="GridLabel"></asp:Label>            
         </EmptyDataTemplate>
         </asp:GridView>
        </div>
        </div>
        <asp:SqlDataSource ID="CupHistoryDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetTeamCupHistory" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </td>
    <td style="width:50%; vertical-align:top;">
        <div class="basic_element">
        <div class="red_title"> 
        <asp:Label ID="InternationalCupHistoryTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_InternationalCup %>" CssClass="white_title"></asp:Label>
        </div><div class="padding5">
        <asp:GridView ID="InternationalCupHistoryGrid" DataSourceID="InternationalCupHistoryDataSource" runat="server" AutoGenerateColumns="false"
         SkinId="Professional" >
         
         <Columns>
            <asp:BoundField DataField="Season" HeaderText="<%$ Resources:Resource, Global_Season %>" />
            <asp:BoundField HeaderText="<%$ Resources:Resource, Global_TeamName %>" DataField="TeamName" />
            <asp:BoundField HeaderText="<%$ Resources:Resource, Global_Round %>" DataField="Round" />
         </Columns>
         <EmptyDataTemplate>
            <asp:Label ID="NoGamesLabel" runat="server" Text="<%$ Resources:Resource, TeamEvents_NoInternationalCupNationalCup %>" SkinID="GridLabel"></asp:Label>            
         </EmptyDataTemplate>
         </asp:GridView>
         </div></div>
        <asp:SqlDataSource ID="InternationalCupHistoryDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetTeamInternationalCupHistory" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </td>
    </tr>
    
    </table>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="LatestEventsTitleLabel" runat="server" Text="<%$ Resources:Resource, Global_LatestEvents %>" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
    <br />
    <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" 
        AutoGenerateColumns="False" GridLines="None" SkinID="Professional" AllowPaging="True"
        PageSize="15">
        <PagerSettings FirstPageText="<%$ Resources:Resource, FirstPage %>" LastPageText="<%$ Resources:Resource, LastPage %>"
            Mode="NumericFirstLast" PageButtonCount="10" Position="Bottom" />
        <PagerStyle CssClass="pagination" HorizontalAlign="Center" />
        <Columns>
            <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Date %>">
                <ItemTemplate>
                    <asp:Label ID="DateLabel" runat="server" Text='<%# Eval("Date") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Label ID="EventTextLabel" runat="server" Text='<%# Eval("Text") %>' SkinID="GridLabel"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            <asp:Label ID="VeryNewLabel" runat="server" Text="<%$ Resources:Resource, TeamEvents_VeryNewLabel %>"></asp:Label>
        </EmptyDataTemplate>
    </asp:GridView>
    
    </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="Nivdal_GetLatestTeamevents" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
</asp:Content>
